import http from "@/utils/fetch";

/**
 * 供应商管理-供应商列表
 */
// 获取供应商列表
export function getSupplierList(params) {
  return http.post("/Admin/Supplier/supplierList", params);
}

// 获取入驻供应商列表
export function supplierApplyList(params) {
  return http.post("/Admin/Supplier/supplierApplyList", params);
}
// 查看供应商信息
export function getSupplierInfo(id) {
  return http.get("/Admin/Supplier/supplierInfoById", { id: id });
}
// 添加入驻供应商备注
export function supplierApplyRemark(params) {
  return http.post("Admin/Supplier/supplierApplyEdit", { id: params.applyId, remark: params.remark });
}
// 获取省份列表
export function getProvinceList() {
  return http.get("/Admin/Supplier/getCompanyArea");
}
// 编辑供应商信息
export function editSupplier(params) {
  return http.post("/Admin/Supplier/editSupplierById", params, true);
}
// 获取区域二级列表
export function getCompanyArea(id) {
  return http.get("/Admin/Supplier/getSecondCompanyArea", { id, id });
}

// 获取申请审批列表
export function saleApplyList(params) {
  return http.get("/Admin/SaleUser/saleApplyList", params, true);
}

// 查看成员资料
export function saleApplyDetail(id) {
  return http.post("/Admin/SaleUser/saleApplyDetail", { sale_user_id: id });
}

// 编辑成员资料信息
export function saleUserEdit(params) {
  return http.post("/Admin/SaleUser/saleUserEdit", params, true);
}

// 审批拒绝
export function checkRefuse(params) {
  return http.post("/Admin/SaleUser/checkRefuse", params, true);
}

// 审批通过
export function checkPass(params) {
  return http.post("/Admin/SaleUser/checkPass", params, true);
}

// 分单接口
export function getShopUser() {
  return http.post("/Admin/Order/getShopUser");
}
// 添加供应商
export function addSupplier(params) {
  return http.post("/Admin/Supplier/addSupplier", params, true);
}
// 分单供应商列表
export function supplierLists() {
  return http.post("/Admin/Supplier/supplierLists");
}
// 编辑供应商是否显示
export function editSupplierShow(params) {
  return http.post("/Admin/Supplier/editSupplierShow", params, true);
}
// 编辑供应商品类是否显示
export function editSupplierCategoryShow(params) {
  return http.post("/Admin/Supplier/editSupplierCategoryShow", params, true);
}
// 编辑品类排序
export function editSupplierCategorySort(params) {
  return http.post("/Admin/Supplier/editSupplierCategorySort", params, true);
}
// 编辑供应商排序
export function editSupplierSort(params) {
  return http.post("/Admin/Supplier/editSupplierSort", params, true);
}
// 添加供应商品类
export function addSupplierCategory(params) {
  return http.post("/Admin/Supplier/addSupplierCategory", params, true);
}
// /Supplier/addSupplierData

// 添加供应商品类
export function addSupplierData() {
  return http.get("/Admin/Supplier/addSupplierData");
}
// 删除品类
export function delSupplierCategory(id) {
  return http.get("/Admin/Supplier/delSupplierCategory", { category_id: id });
}
// 
export function supplierOrderList(params) {
  return http.post("/Admin/Supplier/supplierOrderList", params, true);
}

// 门店列表
export function shopList(params) {
  return http.post("Admin/Supplier/shopList", params, true);
}
// 添加门店
export function addShopData(params) {
  return http.post("Admin/Supplier/addShopData", params);
}
// 编辑门店
export function editShopData(params) {
  return http.post("Admin/Supplier/editShopData", params);
}
// 删除门店
export function delShopData(params) {
  return http.post("Admin/Supplier/delShopData", params);
}